package com.koron.order.overhaul.utils;

/**
 * @author twcao
 * @title: Constants
 * @projectName GDH_EAM_V2
 * @description: 大修工单常量
 * @date 2021/9/308:57
 */
public class Constants {

    /**
     * 即将过期的时长
     */
    public static final long EXPIRING_DURATION = 3 * 24 * 3600;

    public static final class OverhaulStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待派工
        public static final String DISPATCHING = "WAIT_DISPATCH";
        // 待执行
        public static final String TO_EXECUTE = "WAIT_EXECUTE";
        // 执行中
        public static final String EXECUTE = "IN_EXECUTE";
        // 编制大修报告
        public static final String PREPARE_REPORT = "PREPARE_REPORT";
        // 待验收
        public static final String TO_ACCEPT = "WAIT_ACCEPT";
        // 已归档
        public static final String ARCHIVED = "ARCHIVED";
    }

    public static final String OVERHAUL_PROCESS_CODE = "overhaul_accept";

    public static final String ORDER_GRADE_PROCESS_CODE = "order_grade_audit";

    public static final String GRADE_CODE_SPLIT = "_FJ";

    public static final class OrderGradeStatus {
        // 草稿
        public static final String DRAFT = "DRAFT";
        // 待审核
        public static final String TO_AUDIT = "WAIT_REVIEW";
        // 已结束
        public static final String FINISH = "ARCHIVED";
    }

    public static final class OrderSource {
        //手工录入
        public static final String ENTER_ORDER = "enter_order";
        //复制产生
        public static final String COPY_ORDER = "COPY_ORDER";
        //计划产生
        public static final String PLAN_ORDER = "plan_order";
    }

    public static final class YesOrNo {
        public static final Integer YES = 1;
        public static final Integer NO = 0;
    }

    /**
     * 计划状态红绿灯
     */
    public static final class Signal {
        // 【状态不为已归档，且计划结束时间-当前时间>3天】或【状态为已归档，且实际结束时间≤计划结束时间】
        public static final String ON_TIME = "onTime";

        // 【状态不为已归档，且计划结束时间>当前时间，且计划结束时间-当前时间<=3天】
        public static final String EXPIRING = "expiring";

        // 【状态不为已归档，且当前时间≥计划结束时间】或【状态为已归档，且实际结束时间>计划结束时间】
        public static final String EXPIRED = "expired";
    }
}
